<style>
    #hazardReportPlan-edit .layui-input-block {
        margin-left: 144px;
    }

    #hazardReportPlan-edit .layui-form-label {
        width: 113px;
    }
</style>
<div class="febs-container" id="hazardReportPlan-edit">
    <div class="febs-open-body">
        <form class="layui-form" action="" lay-filter="hazardReportPlan-edit-form">
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">基本信息</blockquote>
                <div class="layui-card-body">
                    <div class="layui-form-item febs-hide">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">隐患信息id：</label>
                                <div class="layui-input-block ">
                                    <input type="text" name="reportId" class="layui-input"
                                           th:value="${hazardReport.reportId}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">公司Id：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="tenantId" autocomplete="off" class="layui-input"
                                           maxlength="32" th:value="${hazardReport.tenantId}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">隐患单号：</label>
                            <div class="layui-input-block layui-input-block-html"
                                 th:text="${hazardReport.reportNo}"></div>
                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">公司名称：</label>
                            <div class="layui-input-block layui-input-block-html"
                                 th:text="${hazardReport.tenantName}"></div>
                        </div>
                    </div>
<!--                    <div class="layui-form-item">-->

<!--                        <div class="layui-col-md6">-->
<!--                            <label class="layui-form-label layui-form-label-detail">项目名称：</label>-->
<!--                            <div class="layui-input-block layui-input-block-html"-->
<!--                                 th:text="${hazardReport.projectName}"></div>-->
<!--                        </div>-->
<!--                        <div class="layui-col-md6">-->
<!--                            <label class="layui-form-label layui-form-label-detail">位置区域：</label>-->
<!--                            <div class="layui-input-block layui-input-block-html"-->
<!--                                 th:text="${hazardReport.areaName}"></div>-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">隐患图片：</label>
                            <div class="layui-input-block">
                                <div id="fileUpload" style="height: 120px ;width: 100%">
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">隐患描述：</label>
                            <div class="layui-input-block layui-input-block-html"
                                 th:text="${hazardReport.hazardDescription}"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div th:if="${hazardReport.planRecordList} and ${hazardReport.planRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >制定记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportPlanRecordTable" id="hazardReportPlanRecordTable" lay-data="{id: 'hazardReportPlanRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>
            <div th:if="${hazardReport.feedBackRecordList} and ${hazardReport.feedBackRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >整改反馈记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportFeedBackRecordTable" id="hazardReportFeedBackRecordTable" lay-data="{id: 'hazardReportFeedBackRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>
            <div th:if="${hazardReport.auditRecordList} and ${hazardReport.auditRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >审核记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportAuditRecordTable" id="hazardReportAuditRecordTable" lay-data="{id: 'hazardReportAuditRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>

            <div th:if="${hazardReport.forwardFlg} ne '2' ">
                <div class="layui-card">
                    <blockquote  class="layui-elem-quote layui-elem-quote-primary">整改计划</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">整改意见：</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="status" title="整改" lay-filter="planStatus" value="3"
                                           checked>
                                    <input type="radio" name="status" title="退回" lay-filter="planStatus" value="11">
                                </div>
                            </div>
                        </div>
                        <div id="rectification">
                            <div class="layui-form-item">
                                <div class="layui-col-md6">
                                        <label class="layui-form-label febs-form-item-require">项目名称：</label>
                                        <div class="layui-input-block">
                                            <select name="projectId" id="projectId" lay-search="" lay-filter="projectId" lay-verify="required">
                                            </select>
                                        </div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">位置区域：</label>
                                    <div class="layui-input-block">
                                        <select name="areaId" id="areaId" lay-search="" lay-filter="areaId" lay-verify="required">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item febs-hide">
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">项目名称：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="projectName" autocomplete="off" class="layui-input"
                                               maxlength="255">
                                    </div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">位置区域名称：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="areaName" autocomplete="off" class="layui-input"
                                               maxlength="255">
                                    </div>
                                </div>

                            </div>

                            <div class="layui-form-item febs-hide">
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">项目负责人id：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="projectLeaderId" autocomplete="off" class="layui-input"
                                               maxlength="255">
                                    </div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">项目负责人名称：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="projectLeaderName" autocomplete="off" class="layui-input"
                                               maxlength="255">
                                    </div>
                                </div>

                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">隐患类型：</label>
                                    <div class="layui-input-block layui-input-wrap">
                                        <input type="text" name="typeName" id="hazardOperation" autocomplete="off"
                                               class="layui-input " lay-verify="required"
                                               lay-affix="addition" lay-filter="addHazardOperation"
                                               minlength="2" maxlength="10" placeholder="请选择隐患类型"
                                               onchange="clearHazardOperation(this)">
                                        <input type="text" name="hazardOperation" class="layui-input febs-hide">
                                    </div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">截止时间：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="rectificationDate" id="rectificationDate"
                                               placeholder="整改截止时间" autocomplete="off" class="layui-input"
                                               lay-verify="datetime|required">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-md6">
                                    <label class="layui-form-label  febs-form-item-require">责任人：</label>
                                    <div class="layui-input-block layui-input-icon-container">
                                        <input type="text" name="leaderId" class="febs-hide">
                                        <input type="text" name="leaderNo" class="febs-hide">
                                        <input type="text" name="leaderDeptId" class="febs-hide">
                                        <input type="text" name="leaderDeptName" class="febs-hide">
                                        <input type="text" name="leaderName" autocomplete="off" id="inputAuto"
                                               class="layui-input"
                                               minlength="2" maxlength="10" placeholder="请设置责任人"
                                               lay-verify="required">
                                        <div class="layui-input-suffix" id="userManage">
                                            <i class="layui-icon layui-icon-add-1"></i>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label febs-form-item-require">不安全行为：</label>
                                    <div class="layui-input-block">
                                        <select name="unsafeName" id="unsafeName" lay-verify="required">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-md6">
                                    <label class="layui-form-label layui-form-label-detail">所属部门：</label>
                                    <div class="layui-input-block layui-input-block-html" id="deptName"
                                         data-th-text="--"></div>
                                </div>
                                <div class="layui-col-md6">
                                    <label class="layui-form-label layui-form-label-detail">员工工号：</label>
                                    <div class="layui-input-block layui-input-block-html" id="leaderNo"
                                         data-th-text="--"></div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-col-md12">
                                    <label class="layui-form-label febs-form-item-require">整改措施：</label>
                                    <div class="layui-input-block">
                        <textarea type="text" name="rectificationMeasures" autocomplete="off" class="layui-textarea"
                                  minlength="2"
                                  maxlength="800" placeholder="请输入整改措施" lay-verify="required"></textarea>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="febs-hide" id="reback">
                            <div class="layui-form-item">
                                <div class="layui-col-md12">
                                    <label class="layui-form-label febs-form-item-require">退回理由：</label>
                                    <div class="layui-input-block">
                                <textarea type="text" name="auditReason" autocomplete="off" class="layui-textarea"
                                          minlength="2"
                                          maxlength="800" placeholder="请输入退回理由"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <div th:if="${hazardReport.forwardFlg} eq '2'">
                <div class="layui-card">
                    <blockquote  class="layui-elem-quote layui-elem-quote-primary">原整改计划</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">原负责人：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.leaderName}"></div>
                            </div>
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">原负责人用户号：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.leaderNo}"></div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">原负责人部门：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.leaderDeptName}"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-card">
                    <blockquote  class="layui-elem-quote layui-elem-quote-primary">转发审核</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">转发意见：</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="forwardAuditStatus" title="通过" lay-filter="forwardStatus" value="1"
                                           checked>
                                    <input type="radio" name="forwardAuditStatus" title="退回" lay-filter="forwardStatus" value="2">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">新负责人：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.forwardToUserName}"></div>
                            </div>
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">新负责人用户号：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.forwardToUserNo}"></div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label layui-form-label-detail">新负责人部门：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.forwardToUserDeptName}"></div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label layui-form-label-detail">转发备注：</label>
                                <div class="layui-input-block layui-input-block-html"
                                     th:text="${hazardReport.forwardToRemark}"></div>
                            </div>
                        </div>
                        <div class="layui-form-item febs-hide" id="forwardAuditReason" >
                            <div class="layui-col-md12">
                                <label class="layui-form-label febs-form-item-require">转发退回理由：</label>
                                <div class="layui-input-block">
                                <textarea type="text" name="forwardAuditReason"  autocomplete="off" class="layui-textarea"
                                          minlength="2"
                                          maxlength="800" placeholder="请输入退回理由"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="layui-form-item febs-hide">
                <button class="layui-btn" lay-submit="" lay-filter="hazardReportPlan-edit-form-submit"
                        id="submit"></button>
                <button type="reset" class="layui-btn" id="reset"></button>
            </div>
        </form>
    </div>
</div>
<script data-th-inline="javascript">
    var hazardReport = [[${hazardReport}]];
    var currentTenantId = [[${currentTenantId}]];
</script>
<script th:src="@{/febs/js/hazard/hazardReportPlan/hazardReportPlanEdit.js(v=1)}"></script>
